package com.cqust.icc;

import com.cqust.icc.controller.CardController;
import com.cqust.icc.entity.UserInfo;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 张成
 * @version 1.0
 * @date 2022/3/24 14:34
 */
public class Test {


    public static void main(String[] args) {

        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
        UserInfo user = (UserInfo) context.getBean("userinfo");
        System.out.println(user);
        System.out.println("***************分割线**************");
        CardController cardController = (CardController) context.getBean("cardController");
        user.setBalance(2022.3);
        cardController.charge(user);
    }
}
